import {
  removeAllStorage,
  setToken,
  setSubject,
  setUserInfo
} from '@/utils/storage'
export default function() {
  return {
    created() {
      if (process.env.NODE_ENV !== 'development') {
        window.onunload = function() {
          removeAllStorage()
        }
      }
    },
    methods: {
      removeAllStorage,
      setToken,
      setSubject,
      setUserInfo
    }
  }
}
